<template>
</template>

<script>
</script>

<style>
</style>
<template>
<div>
<!-- 	时间格式化{{addtime}}
<div>现在时间{{todayTime}}</div> -->
<div v-for="(item,index) in list" :key="item.id">
	
	<span>{{item.address}}</span>
	<span>时间：{{item.addtime | timeFormat}}</span>
</div>
</div>

</template>

<script>
	import moment from 'moment'
	export default{
		data(){
			return{
				  list: [
				              {
				                  "id": 2,
				                  "address": "巩华新村5区四栋2层201",
				                  "content": "下水道堵了1",
				                  "userid": 2,
				                  "username": "李四",
				                  "tel": "138",
				                  "type": 1,
				                  "state": 1,
				                  "typename": "业务房屋报修",
				                  "statename": "等待处理",
				                  "addtime": "2021-10-05 11:52:17.0",
				                  "images": []
				              },
				              {
				                  "id": 1,
				                  "address": "巩华新村5区四栋2层201188",
				                  "content": "下水道堵了",
				                  "userid": 2,
				                  "username": "李四",
				                  "tel": "13511111111",
				                  "type": 1,
				                  "state": 2,
				                  "typename": "业务房屋报修",
				                  "statename": "正在处理",
				                  "addtime": "2021-10-22 11:33:26.0",
				                  "images": [
				                      {
				                          "id": 6,
				                          "repairsid": 1,
				                          "url": "2021/10/22/202110221150137894894.jpg"
				                      },
				                      {
				                          "id": 5,
				                          "repairsid": 1,
				                          "url": "2021/10/22/202110221150466976443.jpg"
				                      }
				                  ]
				              }
				          ],

				todayTime:moment().format('YYYY年MM月DD日 HH:mm:ss'),
				addtime:moment("2021-10-05 11:52:17.0").format('YYYY-M-D')
				
			}
		},
		filters:{
			timeFormat(val){
				
				return moment(val).format("YYYY-MM-DD HH:mm")
			}
		}
	}
</script>

<style>
</style>
